<template>
	<view class="">
			
			<navigator  v-for="(blg,index) in blogs" :url="`/pages/detail/detail?id=${index}`">
				<view class="uni-flex uni-row"  >
					<view class="text" style="-webkit-flex: 1;flex: 1;">{{blg.Title}}</view>
				</view>
			</navigator>
			
		
		
		
		<navigator url="../addition/addition">
			<button type="primary"> 写博客 </button>
		</navigator>
		
		
	</view>	
	
</template>

<script>
	import blog_data from "../../common/js/blogs.js"
	export default {
		data() {
			return {
				blogs:''
			}
		},
		onLoad() {
			uni.request({
				url: 'http://127.0.0.1:8000/news_list/',
				method: 'GET',
				data: {},
				success: res => {
					console.log(res.data);
					this.blogs =res.data;
					
					},
				fail: () => {},
				complete: () => {}
			});
		},
		
		methods: {
			
			}
			
			
	
	}
</script>

<style>
	
	
	
	.flex-item {
		width: 33.3%;
		height: 200rpx;
		text-align: center;
		line-height: 200rpx;
	}
	
	.flex-item-V {
		width: 100%;
		height: 150rpx;
		text-align: center;
		line-height: 150rpx;
	}
	
	.text {
		margin: 15rpx 10rpx;
		padding: 0 20rpx;
		background-color: #ebebeb;
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		color: #777;
		font-size: 26rpx;
	}
	
	.desc {
		/* text-indent: 40rpx; */
	}
	.flex-pc {
		display: flex;
		justify-content: center;
	}
</style>
